package com.osgix.authorize.dao.impl;

import org.springframework.stereotype.Repository;

import com.osgix.authorize.dao.PrivilegeInfoDao;
import com.osgix.authorize.model.PrivilegeInfo;
import com.osgix.common.orm.ibatis.BaseIbatisDao;

@Repository("privilegeInfoDao")
public class PrivilegeInfoDaoImpl extends BaseIbatisDao<PrivilegeInfo, Long> implements PrivilegeInfoDao {

	@Override
	public String getIbatisMapperNamesapce() {
		return "PrivilegeInfo";
	}

	public void saveOrUpdate(PrivilegeInfo privilegeInfo) {
		if (privilegeInfo.getPrivilegeId() == null)
			save(privilegeInfo);
		else
			update(privilegeInfo);
	}

}
